package zero.tech.games.gate.work;

import zero.tech.core.ZeroContext;
import zero.tech.core.work.AynWork;
import zero.tech.games.common.RoomNodeUtil;

public class PullRoomNodesWork extends AynWork{

	@Override
	public void init(Object... objs) throws Exception {
		
	}

	@Override
	public void run() {
		while(true) {
			try {
				Thread.sleep(3000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			
			try {
				handle();
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}

	private void handle() {
		RoomNodeUtil roomNodeUtil = ZeroContext.getInstance(RoomNodeUtil.class);
		roomNodeUtil.timer();		
	}

}
